<template>
  <div>
    <toast v-model="toast.show" :type="toast.type" width="12em" class="toast">{{toast.text}}</toast>
  </div>
</template>
<script>
import { Toast } from 'vux'
import { mapGetters } from 'vuex'
export default {
  name: 'alert',
  computed: {
    ...mapGetters({
      toast: 'getShowToast'
    })
  },
  components: {
    Toast
  }
}
</script>
<style lang="less">
  .toast{
    padding:1em
  }
</style>
